package Waiting;

import java.awt.image.BufferedImage;

public class Obstacle {
    //用于记录坐标
    private int x;
    private int y;
    //用于记录障碍物类型
    private int type;
    //用于显示图像
    private BufferedImage show = null;
    //定义当前的场景对象
    private BackGround bg = null;

    public Obstacle(int x, int y,int type,BackGround bg){ //定义构造函数
        this.x=x;
        this.y=y;
        this.type=type;
        this.bg=bg;
        //初始化show
        show = StaticValue.obstacle.get(type); //得到该类型的障碍物图像

    }
    public int getX() {
        return x;
    }

    public int getY() {
        return y;
    }

    public int getType() {
        return type;
    }

    public BufferedImage getShow() {
        return show;
    }
}
